<template>
  <el-form-item prop="isInput" label="是否允许输入">
    <el-switch
      v-model="optionModel.isInput"
      :active-value="1"
      active-text="是"
      :inactive-value="0"
      inactive-text="否"
      inline-prompt
    ></el-switch>
  </el-form-item>
</template>

<script>
export default {
  name: 'IsInputEditor',
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object
  },
  computed: {
    isShow() {
      // 当组件为staticText, 并且isSetSize为false时，不显示
      if (
        this.selectedWidget &&
        this.selectedWidget.type === 'staticText' &&
        this.optionModel.isSetSize === false
      ) {
        return false
      }

      return true
    }
  }
}
</script>

<style scoped></style>
